package com.sita.bike.rest.model;

import java.io.Serializable;

/**
 * Created by xiaodong on 16/2/24.
 */
public class SimpleAccount implements Serializable {
    public String id;
    public String avatar;
    public String nickName;
    public String imId;
    public String imPwd;
    public String birthday;
    public int gender = 0;
    public String address;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SimpleAccount that = (SimpleAccount) o;

        if (gender != that.gender) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (avatar != null ? !avatar.equals(that.avatar) : that.avatar != null) return false;
        if (nickName != null ? !nickName.equals(that.nickName) : that.nickName != null)
            return false;
        if (imId != null ? !imId.equals(that.imId) : that.imId != null) return false;
        if (imPwd != null ? !imPwd.equals(that.imPwd) : that.imPwd != null) return false;
        if (birthday != null ? !birthday.equals(that.birthday) : that.birthday != null)
            return false;
        return !(address != null ? !address.equals(that.address) : that.address != null);

    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (avatar != null ? avatar.hashCode() : 0);
        result = 31 * result + (nickName != null ? nickName.hashCode() : 0);
        result = 31 * result + (imId != null ? imId.hashCode() : 0);
        result = 31 * result + (imPwd != null ? imPwd.hashCode() : 0);
        result = 31 * result + (birthday != null ? birthday.hashCode() : 0);
        result = 31 * result + gender;
        result = 31 * result + (address != null ? address.hashCode() : 0);
        return result;
    }
}
